<html>
<body>
<script>
    window.addEventListener('load', () => {
        const ws = new WebSocket('ws://localhost:8080/ws/greetings')
        ws.addEventListener('open', () => {
            console.log('starting...');
            ws.send('')
        })
        ws.addEventListener('message', (message) => console.log('new message: ' + message.data))
    })
</script>
</body>
</html>